(ns ru.nsu.fit.g7202.seml)

;; read wants *in* set to a java.io.PushbackReader. 
;; with-open sets *in* and closes it after it's done.
;; *read-eval* specifies whether to evaluate #=() forms when reading.
;; This is a very good idea if you are reading forms from untrusted sources.
(defn parseFile [filename]
  (with-open
    [reader (java.io.PushbackReader. (clojure.java.io/reader filename))]
    (binding [*read-eval* false]
      (read reader))))

(defn parseString [str]
  (read-string str))
